<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>jQuery事件 | Introduction</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../home/jQuery_j/5.jquery元素节点操作.html" />
    
    
    <link rel="prev" href="../../home/jQuery_j/3.相关尺寸.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="4.4"
        data-chapter-title="jQuery事件"
        data-filepath="home/jQuery_j/4.jQuery事件.md"
        data-basepath="../.."
        data-revision="Sat Nov 17 2018 12:52:35 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="home/HTML_h/html.html">
            
                
                    <a href="../../home/HTML_h/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="home/HTML_h/1.HTML概述和基本结构.html">
            
                
                    <a href="../../home/HTML_h/1.HTML概述和基本结构.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        HTML概述和基本结构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="home/HTML_h/2.HTML中Head头.html">
            
                
                    <a href="../../home/HTML_h/2.HTML中Head头.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        HTML中Head头
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="home/HTML_h/3.HTML标题.html">
            
                
                    <a href="../../home/HTML_h/3.HTML标题.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        HTML标题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="home/HTML_h/4.HTML段落,换行,字符实体.html">
            
                
                    <a href="../../home/HTML_h/4.HTML段落,换行,字符实体.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        HTML段落,换行,字符实体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="home/HTML_h/5.HTML块,含样式的标签.html">
            
                
                    <a href="../../home/HTML_h/5.HTML块,含样式的标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        HTML块,含样式的标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="home/HTML_h/6.HTML图片.html">
            
                
                    <a href="../../home/HTML_h/6.HTML图片.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        HTML图片
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="home/HTML_h/7.HTML链接.html">
            
                
                    <a href="../../home/HTML_h/7.HTML链接.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        HTML链接
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="home/HTML_h/8.HTML列表.html">
            
                
                    <a href="../../home/HTML_h/8.HTML列表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        HTML列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="home/HTML_h/9.HTML表格.html">
            
                
                    <a href="../../home/HTML_h/9.HTML表格.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.9.</b>
                        
                        HTML表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="home/HTML_h/10.HTML表单.html">
            
                
                    <a href="../../home/HTML_h/10.HTML表单.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.10.</b>
                        
                        HTML表单
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="home/HTML_h/css.html">
            
            <span><b>2.</b> CSS</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="home/CSS_c/1.CSS基本语法.html">
            
                
                    <a href="../../home/CSS_c/1.CSS基本语法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        CSS基本语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="home/CSS_c/2.CSS选择器.html">
            
                
                    <a href="../../home/CSS_c/2.CSS选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        CSS选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="home/CSS_c/3.CSS颜色,文本字体.html">
            
                
                    <a href="../../home/CSS_c/3.CSS颜色,文本字体.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        CSS颜色,文本字体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="home/CSS_c/4.边框,背景,边距,溢出.html">
            
                
                    <a href="../../home/CSS_c/4.边框,背景,边距,溢出.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        边框,背景,边距,溢出
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="home/CSS_c/5.盒子.html">
            
                
                    <a href="../../home/CSS_c/5.盒子.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        盒子
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="home/CSS_c/6.元素,内联元素,内联块元素.html">
            
                
                    <a href="../../home/CSS_c/6.元素,内联元素,内联块元素.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        元素,内联元素,内联块元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="home/CSS_c/7.浮动.html">
            
                
                    <a href="../../home/CSS_c/7.浮动.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="home/CSS_c/8.定位.html">
            
                
                    <a href="../../home/CSS_c/8.定位.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        定位
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="home/JavaScript_j/JavaScript.html">
            
                
                    <a href="../../home/JavaScript_j/JavaScript.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        JavaScript
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="home/JavaScript_j/1.js使用场景.html">
            
                
                    <a href="../../home/JavaScript_j/1.js使用场景.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        js使用场景
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="home/JavaScript_j/2.js变量.html">
            
                
                    <a href="../../home/JavaScript_j/2.js变量.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        js变量
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="home/JavaScript_j/3.js数据类型转换.html">
            
                
                    <a href="../../home/JavaScript_j/3.js数据类型转换.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        js数据类型转换
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="home/JavaScript_j/4.js运算符.html">
            
                
                    <a href="../../home/JavaScript_j/4.js运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        js运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="home/JavaScript_j/5.js流程控制.html">
            
                
                    <a href="../../home/JavaScript_j/5.js流程控制.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        js流程控制
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="home/JavaScript_j/6.js循环.html">
            
                
                    <a href="../../home/JavaScript_j/6.js循环.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        js循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="home/JavaScript_j/7.js元素获取与操作.html">
            
                
                    <a href="../../home/JavaScript_j/7.js元素获取与操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        js元素获取与操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="home/JavaScript_j/8.js定时器.html">
            
                
                    <a href="../../home/JavaScript_j/8.js定时器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        js定时器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="home/JavaScript_j/9.js函数.html">
            
                
                    <a href="../../home/JavaScript_j/9.js函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        js函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="home/JavaScript_j/10.js对象.html">
            
                
                    <a href="../../home/JavaScript_j/10.js对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        js对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="home/JavaScript_j/11.js数组.html">
            
                
                    <a href="../../home/JavaScript_j/11.js数组.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.11.</b>
                        
                        js数组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="home/JavaScript_j/12.js数学对象Math.html">
            
                
                    <a href="../../home/JavaScript_j/12.js数学对象Math.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.12.</b>
                        
                        js数学对象Math
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="home/JavaScript_j/13.js正则.html">
            
                
                    <a href="../../home/JavaScript_j/13.js正则.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.13.</b>
                        
                        js正则
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="home/jQuery_j/jQuery.html">
            
                
                    <a href="../../home/jQuery_j/jQuery.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        jQuery
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="home/jQuery_j/1.jquery选择器.html">
            
                
                    <a href="../../home/jQuery_j/1.jquery选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        jquery选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="home/jQuery_j/2.jQuery元素操作.html">
            
                
                    <a href="../../home/jQuery_j/2.jQuery元素操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        jQuery元素操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="home/jQuery_j/3.相关尺寸.html">
            
                
                    <a href="../../home/jQuery_j/3.相关尺寸.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        相关尺寸
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="4.4" data-path="home/jQuery_j/4.jQuery事件.html">
            
                
                    <a href="../../home/jQuery_j/4.jQuery事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        jQuery事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="home/jQuery_j/5.jquery元素节点操作.html">
            
                
                    <a href="../../home/jQuery_j/5.jquery元素节点操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        jquery元素节点操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="home/AJAX/AJAX.html">
            
                
                    <a href="../../home/AJAX/AJAX.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        AJAX
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6" data-path="home/VUE/vue.html">
            
                
                    <a href="../../home/VUE/vue.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        VUE
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="home/VUE/1.创建第一个vue实例.html">
            
                
                    <a href="../../home/VUE/1.创建第一个vue实例.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        创建第一个vue实例
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="home/VUE/2.模版语法和基本指令.html">
            
                
                    <a href="../../home/VUE/2.模版语法和基本指令.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        模版语法和基本指令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="home/VUE/3.Vue中的计算属性和侦听器.html">
            
                
                    <a href="../../home/VUE/3.Vue中的计算属性和侦听器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        Vue中的计算属性和侦听器
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >Introduction</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x5173;&#x4E8E;&#x4E8B;&#x4EF6;">&#x5173;&#x4E8E;&#x4E8B;&#x4EF6;</h1>
<hr>
<ul>
<li><h2 id="&#x4E8B;&#x4EF6;&#x7ED1;&#x5B9A;">&#x4E8B;&#x4EF6;&#x7ED1;&#x5B9A;</h2>
<ul>
<li><h4 id="1&#x57FA;&#x672C;&#x7ED1;&#x5B9A;">1.&#x57FA;&#x672C;&#x7ED1;&#x5B9A;</h4>
<pre><code class="lang-js">  $(element).click(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{})

  $(element).dblclick(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{})

  &#x3002;&#x3002;&#x3002;

  &#x52A0;&#x8F7D;&#x5B8C;&#x6BD5;&#x4E8B;&#x4EF6;

  $(<span class="hljs-built_in">document</span>).ready(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{})

  $(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{})
</code></pre>
</li>
<li><h4 id="2&#x65B9;&#x6CD5;&#x7ED1;&#x5B9A;">2.&#x65B9;&#x6CD5;&#x7ED1;&#x5B9A;</h4>
<pre><code class="lang-js">  $(element).bind(<span class="hljs-string">&apos;click&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{})<span class="hljs-comment">//&#x7ED1;&#x5B9A;&#x4E8B;&#x4EF6;</span>

  $(element).unbind();<span class="hljs-comment">//&#x89E3;&#x9664;&#x4E8B;&#x4EF6;&#x7ED1;&#x5B9A;</span>
</code></pre>
</li>
<li><h4 id="3&#x52A8;&#x6001;&#x7ED1;&#x5B9A;">3.&#x52A8;&#x6001;&#x7ED1;&#x5B9A;</h4>
<pre><code class="lang-js">  $(element).live(<span class="hljs-string">&apos;click&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{})

  &#x9700;&#x6CE8;&#x610F;&#xFF0C;live&#x65B9;&#x6CD5;&#x5728;&#x9AD8;&#x7248;&#x672C;&#x7684;jquery&#x4E2D;&#x79FB;&#x51FA;&#x4E86;,&#x5728;&#x4F7F;&#x7528;&#x65F6;&#x8BF7;&#x6CE8;&#x610F;&#x7248;&#x672C;

  &#x5728;&#x9AD8;&#x7248;&#x672C;&#x5F53;&#x4E2D;&#x4F7F;&#x7528;.on&#x4EE3;&#x66FF; $(<span class="hljs-string">&apos;body&apos;</span>).on(<span class="hljs-string">&apos;click&apos;</span>,<span class="hljs-string">&apos;&#x8981;&#x7ED1;&#x5B9A;&#x4E8B;&#x4EF6;&#x7684;&#x5143;&#x7D20;&apos;</span>,<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{})
</code></pre>
</li>
</ul>
</li>
</ul>
<ul>
<li><h2 id="&#x4E8B;&#x4EF6;&#x89E6;&#x53D1;">&#x4E8B;&#x4EF6;&#x89E6;&#x53D1;</h2>
<ul>
<li>&#x5F53;&#x6211;&#x4EEC;&#x60F3;&#x8981;&#x53BB;&#x89E6;&#x53D1;&#x67D0;&#x4E2A;&#x5143;&#x7D20;&#x7684;&#x4E8B;&#x4EF6;&#x65F6;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; trigger,&#x6CE8;&#x610F;&#x9700;&#x6307;&#x5B9A;&#x5143;&#x7D20;&#x7684;&#x4E8B;&#x4EF6;&#x7C7B;&#x578B;<pre><code class="lang-js">  $(element).trigger(<span class="hljs-string">&apos;click&apos;</span>)
</code></pre>
</li>
</ul>
</li>
<li><h2 id="&#x4E8B;&#x4EF6;&#x5192;&#x6CE1;&#x548C;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;">&#x4E8B;&#x4EF6;&#x5192;&#x6CE1;&#x548C;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;</h2>
<ul>
<li><p>&#x4E8B;&#x4EF6;&#x5192;&#x6CE1;</p>
<pre><code class="lang-js">  &#x5F53;&#x89E6;&#x53D1;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x7684;&#x4E8B;&#x4EF6;&#x65F6;,&#x4F1A;&#x81EA;&#x52A8;&#x89E6;&#x53D1;&#x8BE5;&#x5143;&#x7D20;&#x7684;&#x7236;&#x7EA7;&#x548C;&#x5148;&#x8F88;&#x7EA7;&#x7684;&#x540C;&#x7C7B;&#x578B;&#x4E8B;&#x4EF6;,&#x9020;&#x6210;&#x4E8B;&#x4EF6;&#x5E76;&#x53D1;,&#x5BFC;&#x81F4;&#x9875;&#x9762;&#x6DF7;&#x4E71;,&#x6211;&#x4EEC;&#x79F0;&#x4E3A;&#x4E8B;&#x4EF6;&#x5192;&#x6CE1;

  &#x6B64;&#x65F6;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5728;&#x5143;&#x7D20;&#x7684;&#x4E8B;&#x4EF6;&#x5904;&#x7406;&#x51FD;&#x6570;&#x4E2D; &#x8FD4;&#x56DE;&#x4E00;&#x4E2A;<span class="hljs-literal">false</span> &#x6765;&#x8FDB;&#x884C;&#x963B;&#x6B62;,&#x6CE8;&#x610F;&#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#x4EC5;&#x9650;&#x4E8E;&#x5728;jquery&#x4E2D;&#x4F7F;&#x7528;
</code></pre>
</li>
<li><p>&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;</p>
<pre><code class="lang-js">  &#x5728;&#x9875;&#x9762;&#x4E2D;&#x6709;&#x4E9B;&#x5143;&#x7D20;&#x662F;&#x5177;&#x5907;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;&#x7684;,&#x4F8B;&#x5982;a&#x94FE;&#x63A5;&#x7684;&#x5355;&#x51FB;,&#x8868;&#x5355;&#x7684;&#x63D0;&#x4EA4;,&#x90FD;&#x4F1A;&#x8FDB;&#x884C;&#x8DF3;&#x8F6C;&#x6216;&#x63D0;&#x4EA4;,&#x8FD9;&#x4E9B;&#x6211;&#x4EEC;&#x6210;&#x4E3A;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;

  &#x4F46;&#x662F;&#x5728;&#x7ED1;&#x5B9A;&#x4E0A;&#x4E8B;&#x4EF6;&#x540E;,&#x5B83;&#x9996;&#x5148;&#x4F1A;&#x5148;&#x6267;&#x884C;&#x4E8B;&#x4EF6;,&#x518D;&#x53BB;&#x6267;&#x884C;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;,&#x800C;&#x6709;&#x65F6;&#x6211;&#x4EEC;&#x53EA;&#x60F3;&#x8BA9;&#x5176;&#x89E6;&#x53D1;&#x4E8B;&#x4EF6;,&#x4F46;&#x4E0D;&#x6267;&#x884C;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;&#x65F6;,

  &#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5728;&#x8BE5;&#x5143;&#x7D20;&#x7684;&#x4E8B;&#x4EF6;&#x4E2D; &#x8FD4;&#x56DE;&#x4E00;&#x4E2A;<span class="hljs-literal">false</span>&#x6765;&#x8FDB;&#x884C;&#x963B;&#x6B62;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;
</code></pre>
<pre><code class="lang-html">  <span class="hljs-tag">&lt;<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;http://www.baidu.com&quot;</span>&gt;</span>&#x767E;&#x5EA6;<span class="hljs-tag">&lt;/<span class="hljs-title">a</span>&gt;</span>
</code></pre>
<pre><code class="lang-js">  $(<span class="hljs-string">&apos;a&apos;</span>).click(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{

      <span class="hljs-comment">//&#x963B;&#x6B62;&#x9ED8;&#x8BA4;&#x884C;&#x4E3A;</span>
      <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
  })
</code></pre>
</li>
<li><p>&#x83B7;&#x5F97;&#x5F53;&#x524D;&#x9F20;&#x6807;&#x7684;&#x4F4D;&#x7F6E;&#x548C;&#x6309;&#x952E;</p>
<blockquote>
<p>&#x6211;&#x4EEC;&#x6709;&#x9F20;&#x6807;&#x548C;&#x952E;&#x76D8;&#x6309;&#x952E;&#x7684;&#x4E8B;&#x4EF6;,&#x5728;&#x89E6;&#x53D1;&#x4E8B;&#x4EF6;&#x65F6;&#x5982;&#x679C;&#x6211;&#x4EEC;&#x60F3;&#x8981;&#x83B7;&#x53D6;&#x9F20;&#x6807;&#x7684;&#x4F4D;&#x7F6E;&#x6216;&#x952E;&#x76D8;&#x6309;&#x952E;&#x4FE1;&#x606F;&#x65F6;,</p>
<p>&#x9996;&#x5148;&#x9700;&#x8981;&#x5728;&#x5F53;&#x524D;&#x7684;&#x4E8B;&#x4EF6;&#x4E2D;&#x4F20;&#x9012;&#x4E00;&#x4E2A; &#x4E8B;&#x4EF6;&#x5BF9;&#x8C61; e</p>
</blockquote>
<pre><code class="lang-js">  $(element).click(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>)</span>{
      <span class="hljs-comment">//&#x80FD;&#x591F;&#x83B7;&#x53D6;&#x9F20;&#x6807;&#x7684;x&#x8F74;&#x548C;y&#x8F74;&#x5750;&#x6807;,&#x5750;&#x6807;&#x4F4D;&#x7F6E;&#x76F8;&#x5BF9;&#x4E8E;&#x6D4F;&#x89C8;&#x5668;&#x7A97;&#x53E3;</span>
      <span class="hljs-keyword">var</span> x = e.clientX;
      <span class="hljs-keyword">var</span> y = e.clientY;

      <span class="hljs-comment">//&#x80FD;&#x591F;&#x83B7;&#x53D6;&#x9F20;&#x6807;&#x7684;x&#x8F74;&#x548C;y&#x8F74;&#x5750;&#x6807;,&#x5750;&#x6807;&#x4F4D;&#x7F6E;&#x76F8;&#x5BF9;&#x4E8E;&#x6587;&#x6863;</span>
      <span class="hljs-keyword">var</span> _x = e.pageX;
      <span class="hljs-keyword">var</span> _y = e.pageY
  })
</code></pre>
<pre><code class="lang-js">  $(element).keydown(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>)</span>{
      <span class="hljs-comment">//&#x53EF;&#x4EE5;&#x6253;&#x5370;e&#x5BF9;&#x8C61;,&#x6216;&#x8005;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#x8BE5;&#x5BF9;&#x8C61;&#x4E2D;&#x7684;keyCode&#x5C5E;&#x6027;&#x6765;&#x83B7;&#x53D6;&#x6309;&#x952E;&#x4FE1;&#x606F;</span>
      <span class="hljs-keyword">var</span> key = e.keyCode;
      <span class="hljs-built_in">console</span>.log(key);
  })
</code></pre>
</li>
</ul>
</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../home/jQuery_j/3.相关尺寸.html" class="navigation navigation-prev " aria-label="Previous page: 相关尺寸"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../home/jQuery_j/5.jquery元素节点操作.html" class="navigation navigation-next " aria-label="Next page: jquery元素节点操作"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
